<?php

require_once 'db_conn.php';
header("content-type:text/html;charset=utf-8");


$usename = $_POST['username'];
$password = md5($_POST['password']);
$login_time= time();
 

$sql="
INSERI INTO  user (
id,
account,
password,
logintime
)
VALUES (
NULL,'$username','$password','$login_time'
);
";


$result = $conn->query($sql);
if($result ===false ){
    echo "数据库操作失败！！！：（";
}else {
        echo "注册成功！";
     header("Location: register_1.html");
}
